<?php

/**
 * Gestionnaire des applicatifs secondaires
 *
 * @category   McCube
 * @package    Bundle
 * @author     Leiha Sellier <leiha.sellier@gmail.com>
 * @license    http://creativecommons.org/licenses/by/3.0/  CC BY 3.0
 * @link       http://code.google.com/p/mechanics-cubes/
 */
class McCube_Bundle_Plugin extends McCube_Bundle{

    public $config = array();

    /** */
    public function __construct($name, $rootPath, $parentBundle){
        parent::__construct($name, $rootPath, $parentBundle);
        $this->config = array_merge_recursive(
              $parentBundle->config
            , $this->getConfig('default', false)
        );
    }

    /** */
    public function __get($name){
        return $this->parentBundle->$name;
    }

    /** */
    public function getController($name, $plugin=''){
        return parent::getController($name, $this->name);
    }

}